#ifndef _TEXTELEMENT_H_
#define _TEXTELEMENT_H_

#include <QLineEdit>
#include <QPoint>
#include <QString>
#include <QObject>
#include <QWidget>
#include <QPainter>
#include <QStaticText>
#include <QImage>
#include <QFocusEvent>
#include "PaintArea.h"
#include "connectionClass.h"
//#include "Tool.h"

class TextElement : public QLineEdit
{
public:
	TextElement();
	TextElement(PaintArea*, QPoint&);
	~TextElement(void);
	void showTextBox();
	void closeTextBox();
	//void showTextDisplay(QString);

    PaintArea* ourImage;
	QPoint currentPosition;
	QLineEdit* textEdit;
	void focusOutEvent(QFocusEvent*);
	
	void returnPressed();

private slots:
	void handleReturnPressed();

signals:
	QString onLineEditSubmit();
	void keyPressEvent(QKeyEvent *event);
};

#endif